< previous page page_725 next page >

Page 725
Visual Basic control in the creation of your document. The only exception is that you cannot use the OLE container control as part of an ActiveX document. Another restriction is that an ActiveX document cannot contain embedded objects, such as Word or Excel documents.
CAUTION
If you use custom controls in your document, you need to check licensing and royalty requirements before distributing the controls.

To create the interface of the sample application, you need to add four Label controls, four TextBox controls, and one CommandButton to the UserDocument.
The Label controls should have the following settings for the Name and Caption properties:
Name
Caption
lblPrincipal
Principal:
lblTerm
Term (Years):
lblInterest
Interest Rate (%):
lblPayment
Monthly Payment:

All four text boxes should have their Text properties deleted so that the text boxes appear empty when the document is first shown. The text boxes should be named txtInterest, txtPayment, txtPrincipal, and txtTerm.
The command button of the document should have the Name property set to cmdCalculate and the Caption property set to Calculate Payment.
After you add the controls to the document, your UserDocument should look like the one in Figure 32.4.
0725-01.jpg
Figure 32.4
The Document calculator looks similar
to the LoanCalc program created earlier.

 
< previous page page_725 next page >